package com.yhk.apiinterface;

import com.yhk.apiclientsdk.client.ApiClient;
import com.yhk.apiclientsdk.model.User;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.annotation.Resource;

@SpringBootApplication
public class ApiInterfaceApplication implements ApplicationRunner {
    @Resource
    private ApiClient apiClient;

    public static void main(String[] args) {
        SpringApplication.run(ApiInterfaceApplication.class, args);
    }

    @Override
    public void run(ApplicationArguments args) throws Exception {
        User user = new User();
        user.setUserName("moresuo");
        apiClient.getUserNameByPost(user);
    }
}
